package com.example.zqm.git72.Service;

import com.example.zqm.git72.JavaBean.Club;
import com.example.zqm.git72.JavaBean.ClubCourse;
import com.example.zqm.git72.JavaBean.ClubMap;
import com.example.zqm.git72.JavaBean.ClubVideo;
import com.example.zqm.git72.JavaBean.Train;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/4/10.
 */

public interface ClubService {
 @GET("workout/api.php/lists/mod/club")
    Call<List<Club>>getList();
    @GET("workout/api.php/get/mod/club")
    Call<Club>getClubById(
            @Query("id") String id
    );

//   "http://172.24.10.175/workout/api.php/lists/mod/club/related/1?id=1&map=Clubcourse
    @GET("workout/api.php/lists/mod/club/related/1/id/{id}/map/{type}")
    Call<List<ClubMap>>getTypeList(
            @Path("id") String id,
            @Path("type") String type);

//    @GET("http://172.24.10.175/workout/api.php/lists/mod/club/related/1/id/{id}map/{type}")
//    Call<List<ClubVideo>>getVideoList(
//            @Path("id") String id,
//            @Path("type") String type);

    @GET("workout/api.php/isExits/mod/fans/fans_type/1/fan_id/{fan_id}/userid/{user_id}")
    Call<Integer>ifcollect(
            @Path("fan_id") String fan_id,
            @Path("user_id")  String user_id
    );
    @GET("workout/api.php/focus/fan_id/{fan_id}/userid/{user_id}/fans_type/1")
    Call<Integer>iscollect(
            @Path("fan_id") String fan_id,
            @Path("user_id") String user_id
    );
    @GET("workout/api.php/delete/mod/fans/fan_id/{fan_id}/user_id/{user_id}/fan_type/1")
    Call<Integer>decollect(
            @Path("fan_id") String fan_id,
            @Path("user_id") String user_id
    );
    @GET("workout/api.php/search/mod/club/search_key/club_name/{club_name}")
    Call<List<Club>>bysearch(
            @Query("club_name") String club_name
    );
}
